/**
 * 应用主路由配置
 */
const express = require('express');
const apiRoutes = require('./api');

/**
 * 设置应用路由
 * @param {Express.Application} app - Express应用实例
 */
const setupRoutes = (app) => {
  // API 路由
  app.use('/api', apiRoutes);
  
  // 根路由
  app.get('/health', (req, res) => {
    res.json({
      status: 'healthy',
      timestamp: new Date().toISOString()
    });
  });
  
  return app;
};

module.exports = setupRoutes; 